@extends('layouts.admin_modal')

@section('content')
    <div class="box-body">
        <div class="form-group">
            <label for="input-name" class="col-sm-2 control-label">标识名称</label>

            <div class="col-sm-10">
                <input type="text" class="form-control" id="input-name" placeholder="请输入标识名称……" name="info[name]" value="{{ get_value($detail, 'name', '') }}">
            </div>
        </div>

        <div class="form-group">
            <label for="input-title" class="col-sm-2 control-label">显示名称</label>

            <div class="col-sm-10">
                <input type="text" class="form-control" id="input-title" placeholder="请输入显示名称……" name="info[title]" value="{{ get_value($detail, 'title', '') }}">
            </div>
        </div>

        <div class="form-group">
            <label for="input-type" class="col-sm-2 control-label">配置值类型</label>

            <div class="col-sm-10">
                <select name="info[type]" class="form-control" id="input-type">
                    @foreach(config('admin.systems.config_type_list') as $key=>$value)
                        <option value="{{ $key }}"  {{ get_value($detail, 'type', 0) == $key ? 'selected' : '' }}>{{ $value }}</option>
                    @endforeach
                </select>
            </div>
        </div>

        <div class="form-group">
            <label for="input-group" class="col-sm-2 control-label">配置分组</label>

            <div class="col-sm-10">
                <select name="info[group]" class="form-control" id="input-group">
                    @foreach(config('admin.systems.config_group_list') as $key=>$value)
                        <option value="{{ $key }}"  {{ get_value($detail, 'group', 0) == $key ? 'selected' : '' }}>{{ $value }}</option>
                    @endforeach
                </select>
            </div>
        </div>

        <div class="form-group">
            <label for="input-is_developer" class="col-sm-2 control-label">是否开发者可配置</label>

            <div class="col-sm-10">
                <select name="info[is_developer]" class="form-control" id="input-is_developer">
                    @foreach(config('admin.systems.is_developer_list') as $key=>$value)
                        <option value="{{ $key }}"  {{ get_value($detail, 'is_developer', 0) == $key ? 'selected' : '' }}>{{ $value }}</option>
                    @endforeach
                </select>
            </div>
        </div>

        <div class="form-group">
            <label for="input-extra" class="col-sm-2 control-label">配置项</label>
            <div class="col-sm-10">
                <textarea class="form-control" name="info[extra]" id="input-extra" placeholder="请输入描述信息……">{{ get_value($detail, 'extra', '') }}</textarea>
                <p>（如果是枚举型 需要配置该项）</p>
            </div>
        </div>

        <div class="form-group">
            <label for="input-value" class="col-sm-2 control-label">配置值</label>
            <div class="col-sm-10">
                <textarea class="form-control" name="info[value]" id="input-value" placeholder="请输入描述信息……">{{ get_value($detail, 'value', '') }}</textarea>
            </div>
        </div>

        <div class="form-group">
            <label for="input-description" class="col-sm-2 control-label">描述</label>
            <div class="col-sm-10">
                <textarea class="form-control" name="info[remark]" id="input-remark" placeholder="请输入描述信息……">{{ get_value($detail, 'remark', '') }}</textarea>
            </div>
        </div>



    </div>

    <input type="hidden" name="info[id]" value="{{ get_value($detail, 'id') }}">
@endsection